The present invention relates generally to improved bar code scanning and processing. More particularly, the invention relates to methods and apparatus for achieving a highly precise determination of the position of a rotating optical element, or spinner, of a scanner, in order to provide a reference position for the spinner, and then using a sensor to determine the relative position of the spinner with respect to the reference position, in order to maintain a highly precise determination of the absolute position of the spinner at any desired point in the rotation of the spinner.
Bar code scanners are used in a wide variety of applications and provide a fast and convenient way to collect data. Bar code scanners typically operate in one of at least two modes. A scanner may operate in an omnidirectional or multiline scan mode, producing a multiline scan pattern in which an array of scan lines is used to illuminate a bar code. Alternatively, a scanner may operate in a single line mode, producing a single scan line which is used to illuminate a bar code. A scanner may suitably be designed to operate exclusively in a single line or multiline mode, or may alternatively be designed so that the desired mode can be selected. Operation of a scanner in a single line mode provides the advantage of allowing an operator to aim the scan line more precisely, in order to avoid inadvertently scanning bar codes which may be located near the bar code which it is desired to scan.
In order to produce a scan pattern, a scanner may direct a laser beam from a laser source to a mirrored polygonal spinner which is rotated by an electric motor. The sides of the polygonal spinner may be referred to as facets. The spinner directs light to one or more of a set of pattern mirrors in order to produce a scan pattern which is directed to and emerges from an aperture. It is possible to design a scanner which produces only an omnidirectional scan pattern. In a scanner having such a design, the laser source may simply be turned on continuously as the spinner rotates. The laser beam is sequentially directed by the spinner over the entire set of pattern mirrors, which reflect the laser beam to produce lines making up the scan pattern. Alternatively, it is possible to design a scanner which produces only a single line scan pattern. In such a scanner, the pattern mirror and other optical components of the scanner may be arranged and configured so that the laser source may remain activated at all times, while the laser beam is reflected out of the scanner so as to form a single line scan pattern.
In order to provide greater flexibility in operation, it may be desirable to design a scanner which can operated in an omnidirectional or a single line scan mode, depending on a user selection or other criteria. In designing such a scanner, it is desirable to use a single set of pattern mirrors to minimize the cost and complexity of the scanner. The pattern mirrors and other internal optics are designed in such a way that a multiline scan pattern will be produced if the laser beam remains activated at all times during the rotation of the spinner, and that a single line scan pattern will be produced if the laser beam is activated and deactivated when the spinner is in appropriate positions. Typically, the laser source is activated when the spinner is oriented such that the laser beam is reflected by the spinner so as to be directed to an initial position and remains activated while the spinner turns so that the reflected laser beam is swept from the initial position to a terminal position. The laser source is deactivated when the reflected laser beam reaches the terminal position, and remains deactivated while the spinner turns, until the spinner is once again in a position to direct the reflected laser beam to the initial position.
In order to produce a single line scan pattern, it is important to turn the laser source on and off when the spinner is at the correct positions. Because the speed of the spinner is typically constant once the spinner has achieved operating speed, the relative position of the spinner can be known once the spinner has achieved operating speed. For example, it is possible to know when the spinner has turned through 20 degrees from a reference position. However, in order to know the actual position of the spinner at a particular time, it is necessary to establish an accurate initial position for the spinner at some point after the spinner has achieved operating speed. Establishing an initial position using a sensing device such as, for example, a Hall sensor, is difficult because variations from motor to motor make it difficult to adapt a sensor to determine the position of the specific motor used, and because additional difficulties are introduced by the acceleration period while the spinner is started and brought to operating speed. There exists, therefore, a need for a highly accurate way to identify when a spinner is at a reference position. In many applications it will be desirable for a scanner to provide a user with the flexibility to choose among a number of different scan patterns. For example, it may be desirable to provide a choice between horizontal, vertical or diagonal single line scan patterns, or to allow user or automatic selection of wider or narrower single line scan patterns. In order to provide such flexibility, it is necessary to be able to turn the laser source on and off at selected points during the rotation of the spinner, in order to trace the laser beam appropriately across one or more of the pattern mirrors. In order to accomplish this, it is highly desirable to maintain an accurate determination of the position of the spinner throughout its rotation.
There exists, therefore, a need for a way to maintain a highly accurate determination of a spinner position as the spinner rotates, in order to determine when to activate and deactivate a laser beam in order to produce single line and other desired scan patterns.
The present invention determines the position of a spinner using highly accurate means and maintains a highly accurate determination of the spinner position as the spinner continues to rotate during scanner operation. This determination of the spinner position may then be used to determine when to turn a laser source on and off to produce a desired scan pattern. It will be recognized that a scan pattern produced by a scanner appears as a static pattern, but is in reality the result of the extremely rapid tracing of one or more rays of light emerging from the scanner. A single line scan pattern is the result of the repeated tracing of a ray of light across a single line, and an omnidirectional or multiline scan pattern is typically the repeated sequential tracing of a ray of light over a sequence of single lines.
In order to provide accurate spinner position information to produce desired scan patterns, the present invention employs optical techniques to determine a reference position of the spinner. That is, optical techniques are used to determine when the spinner is at a predefined, known position. U.S. application No. 09/878,462, filed on even date herewith, assigned to the assignee of the present invention and incorporated herein by reference in its entirety, describes exemplary optical techniques and describes the use of optical sensing in order to trigger the deactivation of a laser source producing a laser beam once the spinner is in a position so as to reflect the laser beam to the terminal position of a scan pattern. The aforementioned application further describes the use of timing information based on a known speed of the spinner in order to determine the proper time to activate the laser beam so that the laser beam will be properly directed to the initial position of the scan pattern. The optical techniques described in the above referenced application are used in a scanner according the present invention to identify when the spinner is in a reference position. Once the spinner is identified as being in a reference position, the reference position is noted and used to provide an initial position for a sensor such as a Hall sensor. The sensor is preferably able to provide a highly accurate relative position, and this relative position, combined with the knowledge of the reference position which is provided through the optical techniques, is used to provide information identifying the position of the spinner at any time desired.
In order to identify the reference position of the spinner, an optical element, for example, a diffraction grating, is built into the pattern mirror, suitably at the desired terminal position of the laser beam. When the laser beam strikes the diffraction grating, the laser beam is diffracted to produce a diffracted line. The diffracted line strikes a reference position detector, which produces a reference position signal. The reference position signal is supplied to a controller. When the controller receives the reference position signal, the controller detects that the spinner is in the reference position. Once the controller determines that the spinner is in a reference position, a reading is taken from a sensor, such as a Hall sensor, connected to the motor. The reading of the sensor is thereby correlated with the reference position of the spinner. Once this is done, the sensor reading can be used to identify the position of the spinner, because the sensor is capable of providing a very accurate relative position and because the sensor reading representing the reference position is known. The controller can then advantageously use the position of the spinner to determine when to turn the laser source on or off in order to generate a desired scan pattern or to trigger or terminate a scan or other event when the spinner reaches the required position or positions. Each scan line may suitably be created by the repeated tracing of the laser beam across one of the pattern mirrors by one of the facets of the spinner. Because the position of the spinner at all points during its rotation can be accurately known, it is possible to activate and deactivate the laser beam to produce an omnidirectional scan pattern in which the laser beam is traced across each of the pattern mirrors, a single line scan pattern consisting of any single chosen line of the omnidirectional scan pattern, or a multiline scan pattern comprising a plurality of lines of the omnidirectional scan pattern but fewer than all the lines of the omnidirectional scan pattern.